package com.yongbao.model.dtomapper;

import com.yongbao.model.domain.DishOrderDO;
import com.yongbao.model.request.DishOrderRequest;
import com.yongbao.model.request.manual.order.MainOrderAddRequest;
import com.yongbao.model.vo.DishOrderVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface DishOrderDtoMapper {

    DishOrderDtoMapper INSTANCE = Mappers.getMapper(DishOrderDtoMapper.class);

    /**
    * DO to VO
    * @param dishOrderDO
    * @return
    */
    DishOrderVO do2VO(DishOrderDO dishOrderDO);

    /**
     * request to DO
     * @param request
     * @return
     */
    DishOrderDO request2DO(DishOrderRequest request);

    /**
     * request to DO
     * @param request
     * @return
     */
    DishOrderDO request2DO(MainOrderAddRequest request);
}
